Add getSuspendPostUri and getResumePostUri getters to HttpManagementPayload#264
Add getSuspendPostUri and getResumePostUri getters to HttpManagementPayload#264
Conversation
There was a problem hiding this comment.
Pull request overview
Adds missing suspend/resume management endpoint getters to HttpManagementPayload (used by Azure Functions HTTP management payloads) and introduces a small unit test suite to validate URL generation, along with Gradle test configuration updates for the endtoendtests module.
Changes:
- Add
getSuspendPostUri()andgetResumePostUri()getters toHttpManagementPayload. - Add
HttpManagementPayloadTestunit tests covering all URL getter methods (including suspend/resume). - Enable the JUnit Platform for the default
testtask inendtoendtests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
azurefunctions/src/main/java/com/microsoft/durabletask/azurefunctions/HttpManagementPayload.java |
Exposes suspend/resume POST management URLs via new getters. |
endtoendtests/src/test/java/com/functions/HttpManagementPayloadTest.java |
Adds unit tests to validate URL construction for all management endpoints. |
endtoendtests/build.gradle |
Configures the default Gradle test task to run on JUnit Platform. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
YunchuWang
left a comment
There was a problem hiding this comment.
Code Review Summary
Overall Risk: Low
Merge Recommendation: Safe with fixes the core change is correct and simple, with two minor improvements suggested.
Findings
| ID | Severity | Priority | Title |
|---|---|---|---|
| F1 | Medium | P2 | Unit tests placed in wrong module |
| F2 | Low | P3 | Missing getRewindPostUri test coverage |
| F3 | Nit | P4 | Inconsistent this. prefix in existing getters (pre-existing) |
See inline comments for F1 and F2 details.
F3 (Nit, P4): The existing getRestartPostUri() (line 96) and getRewindPostUri() (line 123) use return restartPostUri / return rewindPostUri without this., while all other getters (including the two new ones in this PR) use return this.fieldName. This is a pre-existing inconsistency not introduced by this PR but could be fixed as a drive-by cleanup.
Issue describing the changes in this PR
Enhancements to HTTP management endpoints:
getSuspendPostUri()andgetResumePostUri()to theHttpManagementPayloadclass, providing URLs for suspending and resuming orchestration instances. This fixes feature parity between SDKs.Testing improvements:
HttpManagementPayloadTest.javawith unit tests covering all URL generation methods inHttpManagementPayload, including the new suspend and resume endpoints.Build and test configuration:
endtoendtests/build.gradleto enable the JUnit Platform for running tests, ensuring compatibility with JUnit 5.Pull request checklist
CHANGELOG.md